from strategy.strategy2 import SpotFutureProfit
from trade.backtest import BackTestModel
from trade.broker.simulate import BrokerSimulate


def run_main():
    futures = [
        "BTC/USDT:USDT",
        "ETH/USDT:USDT",
        "SOL/USDT:USDT",
        "DOGE/USDT:USDT",
        "AGLD/USDT:USDT",
        "HIVE/USDT:USDT",
        "ATA/USDT:USDT",
        "STEEM/USDT:USDT",
        "GMT/USDT:USDT",
        "ZEN/USDT:USDT",
        "SUI/USDT:USDT",
        "THE/USDT:USDT",
    ]
    spots = [x[:-5] for x in futures]
    simulate = BrokerSimulate(
        init_balances={"USDT": {"total": 100000, "debt": 0}},
        slip_rate=0.00075,
        leverages={x: 1 for x in futures},
    )
    strategy = SpotFutureProfit(futures)
    backtest = BackTestModel(simulate, strategy)
    backtest.run_backtest("2024-01-01", "2024-02-21")


if __name__ == "__main__":
    # main_backtest()
    # main_backtest_future_1m()
    # main_backtest_spot()
    run_main()
